<?php
/**
 * 右侧公用浮动控件
 * footercontroller.php
 * 
 * Create on 2015年4月29日 18:59:27
 * Create by yuebin
 */
namespace haibao\cms\business\control\pc\common;

class RightFixedController extends \haibao\cms\business\control\Base{
	
	const IS_INDEX_INDEX = 1;
	const IS_INDEX_ARTICLE = 2;
	const IS_INDEX_IMAGE_COLL = 3;
	const IS_INDEX_TV= 4;
	const IS_INDEX_TAG_LIST = 5;
	const IS_INDEX_DEFAULT = 0;
	public function __construct($updateTime = null,$controlId,$isPublish){
		parent::__construct($updateTime,$controlId,$isPublish);
	}
	
	/**
	 * 获取模版内容
	 * @param : String $content
	 */
	public function displayTemplateHtml(){

		$controlData = $this->getParameter(self::$CONTROL_DATA);
		$content = $this->getParameter(self::$CONTROL_CONTENT);
        
		$isLogin = $isReturnTop = $isIndex = $data = 0;
		if(isset($controlData['manual'])){
			$isLogin = $controlData['manual']['isLogin'];
			$isReturnTop = $controlData['manual']['isReturnTop'];
			if(isset($controlData['manual']['isIndex'])){
				$isIndex = $controlData['manual']['isIndex'];
				if($isIndex == self::IS_INDEX_ARTICLE || $isIndex == self::IS_INDEX_IMAGE_COLL ){
					$data = $controlData['manual']['data'];
				}
			}
		}
		$this->assign('isIndex',$isIndex);
		$this->assign('isLogin',$isLogin);
		$this->assign('isReturnTop',$isReturnTop);
		$this->assign('data',$data);
		$this->assign('haibaoHost',\haibao\classlibrary\cms\Config::getConfig(\haibao\classlibrary\cms\Config::CLASSLIBRARY_CONFIG_HOST_TOP_DOMAIN));

		$parameters = array();
		
		$path = $this->generateHtmlPath(__CLASS__);
		$this->generateHtml($path,$content);
		$content = $this->getHtml($path);
		return $content;
	}
}